﻿function gethttpstr(type) {
	var str = document.getElementById("txt_cn").value;
	if(str == ''){
		return layer.msg($.msg(),$.defn),$('#txt_cn').val(''),!1;
	}
    document.all.form1.action = "/itjson/wordspell/" + $("#txt_cn").val() + "-"  + type  + ".html";
    document.all.form1.submit();
}
function trans() {
    var cc = $("#txt_cn").val();
    var str = '', str2;
    var s;
    for (var i = 0; i < cc.length; i++) {
        if (pydic.indexOf(cc.charAt(i)) != -1 && cc.charCodeAt(i) > 200) {
            s = 1;
            while (pydic.charAt(pydic.indexOf(cc.charAt(i)) + s) != ",") {
                str += pydic.charAt(pydic.indexOf(cc.charAt(i)) + s);
                s++;
            }
            str += " ";
        }
        else {
            str += cc.charAt(i);
        }
    }
    return str;
}
function one2() {
	var str = document.getElementById("txt_cn").value;
	if(str == ''){
		return layer.msg($.msg(),$.defn),$('#txt_cn').val(''),!1;
	}
    $("#code2").val("" + trans() + "");
}
function resetAll() {
    $("#txt_cn").val("");
    $("#code2").val("");
}
//-->